CFLAGS=-g -Wall
TARGETS=server cliente

all: $(TARGETS)

server: main.o server.o login.o sql.o
	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) -I/usr/include/mysql -L/usr/lib -lmysqlclient -lstdc++ -lz

cliente: cliente.o
	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) -lpthread
	rm *.o

clean:
	rm -f $(TARGETS) *- *.o
